// pages/goods/components/goodslist.js
const app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    list: {
      type: Array,
      value: 0
    },
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    navigate(e) {
      let id = e.currentTarget.dataset.id
      let title = e.currentTarget.dataset.title
      app.sr.track('trigger_sku_component', {
        "sku": {
          "sku_id": String(id),
          "sku_name": title
        },
        "spu": {
          "spu_id": String(id),
          "spu_name": title
        },
      })
      wx.navigateTo({
        url: '/pages/goods/detail/index?id=' + id + '&title=' + title,
        success: function (res) { },
        fail: function (res) { },
        complete: function (res) { },
      })
    }

  }
})